package com.ocom.nettyxf.vo;

import com.ocom.common.utils.NumConvertUtil;
import lombok.Data;

/**
 * @Description: TODO
 * @Author: 朱晖
 * @Date: 2022/11/4
 **/
@Data
public class PayDetailQueryVo {

	//响应结果
	String code = "0000" ;

	String type = "02" ;


	//查询类型	1	HEX	0x01 :卡消费 0x02 :卡冲销 0x03 :微信消费
	//0x04 :支付宝消费  0x07 :校园码
	//0x05 :银联 0x08 :微信退款
	//0x09 :支付宝退款  0x10 :校园码退款
	//0x11 :银联退款
	String payType = "00";
	//当前总笔数	2	HEX
	String total = "0000";
	//当前第几笔数	2	HEX
	String current = "0000";
	//消费金额	4	HEX
	String money = "00000000";
	//记录id	4
	String recode = "00000000";
	//保留	12	HEX
	String kip = "000000000000000000000000";
	//消费的年	221027090814
	String payTime = "000000000000";

	//长度
	String orderLen = "00";
	String orderNo = "00";



	public void setOrderNo(String orderNo) {
		this.orderNo = NumConvertUtil.stringToHexString(orderNo);
		this.orderLen = NumConvertUtil.IntToHexStringNum(this.orderNo.length()/2,2);
	}

	public String getHexStr() {
		return  code+
				type+
				payType+
				total+
				current+
				money+
				//记录号
				recode +
				//预留
				kip +
				payTime+
				orderLen+
				orderNo
				;

	}
}
